<?php if (!defined('THINK_PATH')) exit();?><html>
	<head>	
		<title>题目管理</title>
		<script type="text/javascript" src="__JS__/menu.js"></script>
		<script type="text/javascript" src="__JS__/leftmenubar.js"></script>
		<link rel="stylesheet" type="text/css" href="__CSS__/header.css" />
		<script type="text/javascript" src="__JS__/jshelper.js"></script> 
		<script type="text/JavaScript">
			function saqedit(id,testid){
				window.location.href="__URL__/saqedit/id/"+id;
			}
			function saqdelete(id,testid){
				if (confirm("你确定要删除吗")==true) {
					//posthelper([["id",id],],'__URL__/saqdelete');
					postwith('__URL__/saqdelete',{id:id});
				}
			}
			
			window.onload=show;
		</script>
		<script type="text/javascript" src="__JS__/jQuery/jquery.js"></script>
       	<script type="text/javascript" src="__JS__/jQuery/jquery.form.js"></script>
	</head>
	<body>	
		<!-- layout::Auth:header::0 -->
		<div class="nowposition">  <!--当前位置-->
			当前位置：
		
		</div>
	</div>
	<div id="container">
		<!-- layout::Auth:leftmenu::0 -->
		<div class="addstudent">
		<div style=" width:790px; position:relative; left:210px;" align="left">
          <form method="get" action="__URL__/saqdetail/id/<?php echo ($testid); ?>" >
          <a href="__URL__/saqadd" class="nowpositionhref">返回</a><br>
           题目：
      <input type="text" name="name">
           编辑者：
      <input type="text" name="nname">
           所属课程：
            <select name="cname">
              <option value =></option>
              <?php if(is_array($cnlist)): $i = 0; $__LIST__ = $cnlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo1): ++$i;$mod = ($i % 2 )?><option value =	<?php echo ($vo1["name"]); ?>><?php echo ($vo1["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
            </select>
            <input name="submit" type="submit" value="查询">
          </form>
	  </div>
			<!--显示题目-->
			<div  style="width:68%; position:relative; left:210px;">
				<table  border="0" align="center" cellpadding="0px" cellspacing="0px">
					<thead  style="background-color:#f0f0f0;">
						<tr id="table_saq_show_title">
							<td style="width:150px">题目名称</td>
							<td style="width:150px">所属课程</td>
							<td style="width:150px">编辑者</td>
							<td style="width:50px">操作</td>
						</tr>
					</thead>
					<load href"__PUBLIC__/js/list_show.js">
					<input type='hidden' name='testid' value='<?php echo ($testid); ?>'>
					<tbody id="tab">
						<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><tr id="table_saq_show">							
								<td style="width:150px;"><?php echo ($vo["name"]); ?></td>
								<td style="width:180px;"><?php echo ($vo["cname"]); ?></td><!--所属课程-->
								<td style="width:180px;"><?php echo ($vo["nname"]); ?></td><!--所属课程-->
								<td style="display:none;"><?php echo ($vo["id"]); ?></td>	<!--题目ID-->
								<td style="width:100px">
									<a href="javascript:saqedit('<?php echo ($vo["id"]); ?>','<?php echo ($testid); ?>')" style="color:#666666; text-decoration:none; font-size:12px;">编辑</a>
									<!--<input type="button" name="saqedit"onClick="saqedit(<?php echo ($vo["id"]); ?>)" value="编辑">-->
									<a  href="javascript:saqdelete('<?php echo ($vo["id"]); ?>','<?php echo ($testid); ?>')" style="color:#666666; text-decoration:none; font-size:12px;">删除</a>
									<!--<input name="delete_saq" type="reset" onClick="saqdelete(<?php echo ($vo["id"]); ?>)" value="删除">-->
								</td>
							</tr><?php endforeach; endif; else: echo "" ;endif; ?>
					</tbody>
					<!--  试卷名：
	            	<select name="testid">
	              		<?php if(is_array($tlist)): $i = 0; $__LIST__ = $tlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo1): ++$i;$mod = ($i % 2 )?><option value =	<?php echo ($vo1["id"]); ?>><?php echo ($vo1["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
	           		 </select>  -->
				</table>
			
				<div align="right" class="green-black" style="width:900px; position:relative; top:20px; left:-35px;">
					<?php echo ($page); ?>
				</div>
		</div>
		</div>
	</body>
</html>